﻿<?xml version="1.0" encoding="utf-8"?>
<DataTemplates>
  <DataTemplate>
    <DisplayName>Domain Element Class Template</DisplayName>
    <Description>This is a xaml template you can use to customize the visualization of this domain element. You can copy and paste this template into the Resources.xaml resources dictionary and extend it.</Description>
    <ImageURI>/Tum.PDE.LanguageDSL.Visualization;component/Resources/Images/Templates/Class_32-Add.png</ImageURI>
    <SyntaxHighlighting>C#</SyntaxHighlighting>
    <Template>
      <![CDATA[
namespace $CustomString1$
{
  public partial class $CustomString0$
  {
  }
}
]]>
    </Template>
  </DataTemplate>

  <DataTemplate>
    <DisplayName>Domain Element Validation</DisplayName>
    <Description>This is a partial class that is generated for this domain class and that contains a validation method that you can use to validate certain constaints.</Description>
    <ImageURI>/Tum.PDE.LanguageDSL.Visualization;component/Resources/Images/Templates/Validate-32.png</ImageURI>
    <SyntaxHighlighting>C#</SyntaxHighlighting>
    <Template>
      <![CDATA[
using Tum.PDE.ToolFramework.Modeling;    
      
[ModelValidationState(ModelValidationState.Enabled)]      
namespace $CustomString1$
{
  public partial class $CustomString0$
  {
    [ModelValidationMethod(ModelValidationCategories.Open | ModelValidationCategories.Save | ModelValidationCategories.Menu)]
    public virtual void Validate(ModelValidationContext context)
    {
      context.AddMessage(new ModelValidationMessage("MessageID", ModelValidationViolationType.Error, "MessageText", this));
    }
  }
}
]]>
    </Template>
  </DataTemplate>
</DataTemplates>